package models

type User struct {
	ID            int    `gorm:"primary_key" "json:"id" form:"id"`
	Username      string `json:"username" "form:username"`
	Password      string `json:"password" "form:password"`
	LastLoginTime int    `json:"last_login_time"`
	Status        int    `json:"status"`
}

func CheckUser(username string, password string) bool {
	var user User
	db.Select("id").Where(User{Username: username, Password: password}).First(&user)
	if user.ID > 0 {
		return true
	}
	return false
}
